import {Service} from "adajs";
import Input from "../../../../controls/form/input";

class SettinghelpService extends Service {
    defaultData() {
        return {
            title: "设置",
            form: {
                fields: [
                    {type: Input, label: "原密码", name: 'oldpwd', inputType: "password", required: true},
                    {type: Input, label: "设置密码", name: 'newpwd', inputType: "password", required: true},
                    {type: Input, label: "确认密码", name: 'confpwd', inputType: "password", required: true}
                ],
                btns: [
                    {action: "reset", name: "完成"}
                ]
            }
        };
    }

    onupdate(current, data) {
        Object.assign(current, data);
    }
}

export default SettinghelpService;